# -*- encoding=utf8 -*-
__author__ = "hjy"

from airtest.core.api import *
from airtest.cli.parser import cli_setup

if not cli_setup():
    auto_setup(__file__, logdir=True, devices=["android://127.0.0.1:5037/emulator-5554?ori_method=ADBORI&touch_method=ADBTOUCH&",])


# script content
print("start...")


# generate html reports
# from airtest.reports.reports import simple_report
# simple_report(__file__, logpath=True)

touch(Template(r"tpl1761808403523.png", record_pos=(0.123, -0.54), resolution=(900, 1600)))

sleep(2.0)
touch(Template(r"tpl1761808542846.png", record_pos=(-0.099, -0.272), resolution=(900, 1600)))
text("17550010261")
sleep(1.0)
touch(Template(r"tpl1761808444539.png", record_pos=(-0.296, -0.067), resolution=(900, 1600)))

text("a12345678")
sleep(1.0)
touch(Template(r"tpl1761808452678.png", record_pos=(-0.3, 0.789), resolution=(900, 1600)))
sleep(1.0)
touch(Template(r"tpl1761808465160.png", record_pos=(0.002, 0.171), resolution=(900, 1600)))
sleep(1.0)
touch(Template(r"tpl1761808868093.png", record_pos=(0.128, 0.866), resolution=(900, 1600)))
touch(Template(r"tpl1761739191862.png", record_pos=(0.25, -0.311), resolution=(900, 1600)))
touch(Template(r"tpl1761739195107.png", record_pos=(-0.092, 0.0), resolution=(900, 1600)))
text("复古")
touch(Template(r"tpl1761739233432.png", record_pos=(0.217, 0.154), resolution=(900, 1600)))
sleep(1.0)

touch(Template(r"tpl1761739304289.png", record_pos=(0.366, -0.313), resolution=(900, 1600)))
touch(Template(r"tpl1761739307772.png", record_pos=(0.418, -0.499), resolution=(900, 1600)))
text("流行")
sleep(1.0)
touch(Template(r"tpl1761739320152.png", record_pos=(0.211, 0.154), resolution=(900, 1600)))
touch(Template(r"tpl1761739501431.png", record_pos=(-0.427, -0.789), resolution=(900, 1600)))

stop_app("com.kkpodcast") 

home()

from airtest.report.report import simple_report
simple_report(__file__, logpath=True)






